const toolbarOptions = [
	  ['bold', 'italic', 'underline', 'strike'],        // toggled buttons
	  ['blockquote', 'code-block'],

	  [{ 'header': 1 }, { 'header': 2 }],               // custom button values
	  [{ 'list': 'ordered'}, { 'list': 'bullet' }],
	  [{ 'script': 'sub'}, { 'script': 'super' }],      // superscript/subscript
	  [{ 'indent': '-1'}, { 'indent': '+1' }],          // outdent/indent
	  [{ 'direction': 'rtl' }],                         // text direction

	  [{ 'size': ['small', false, 'large', 'huge'] }],  // custom dropdown
	  [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
	  [{ 'color': [] }, { 'background': [] }],          // dropdown with defaults from theme
	  [{ 'font': [] }],
	  [{ 'align': [] }],
	  ['link','image'],
	  ['clean']                                         // remove formatting button
	];

	const quill = new Quill('#editor', {
	  modules: {
	    toolbar: toolbarOptions
	  },
	  theme: 'snow'
	});
	function dataURLtoFile(dataurl,filename){
		let arr = dataurl.split(','),mime=arr[0].match(/:(.*?);/)[1],
			bstr = atob(arr[1]),n = bstr.length,u8arr=new Uint8Array(n);
		while (n--){
			u8arr[n] = bstr.charCodeAt(n);
		}
		return new File([u8arr],filename,{type:mime});
	}